export default function ({url, method, data}){
	return new Promise((resolve, reject)=> {
		uni.request({
			url:`https://api-hmugo-web.itheima.net/api/public/v1/${url}`,
			method,
			data,
		}).then(res=>{
			resolve(res[1])
		}).catch(err=>{
			reject(err)
		})
	})
}
